home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 1138 / source.zip / FRMFOLD.FRM < prev    next >
Text File  |  1995-02-14  |  3KB  |  103 lines

  1. VERSION 2.00
  2. Begin Form frmfold 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Copy message to which folder?"
  5.    ClientHeight    =   2628
  6.    ClientLeft      =   2448
  7.    ClientTop       =   3624
  8.    ClientWidth     =   4452
  9.    ClipControls    =   0   'False
  10.    Height          =   3048
  11.    Left            =   2400
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   2628
  16.    ScaleWidth      =   4452
  17.    Top             =   3252
  18.    Width           =   4548
  19.    Begin ComboBox cmbfolder 
  20.       BackColor       =   &H00FFFFFF&
  21.       Height          =   288
  22.       Left            =   360
  23.       Sorted          =   -1  'True
  24.       Style           =   2  'Dropdown List
  25.       TabIndex        =   0
  26.       Top             =   360
  27.       Width           =   2412
  28.    End
  29.    Begin CommandButton cmdcancel 
  30.       Cancel          =   -1  'True
  31.       Caption         =   "C&ancel"
  32.       Height          =   372
  33.       Left            =   3360
  34.       TabIndex        =   2
  35.       Top             =   840
  36.       Width           =   972
  37.    End
  38.    Begin CommandButton cmdOK 
  39.       Caption         =   "&OK"
  40.       Default         =   -1  'True
  41.       Enabled         =   0   'False
  42.       Height          =   372
  43.       Left            =   3360
  44.       TabIndex        =   1
  45.       Top             =   360
  46.       Width           =   972
  47.    End
  48. End
  49. Option Explicit
  50.  
  51. Sub cmbfolder_Click ()
  52.     cmdOK.Enabled = True
  53. End Sub
  54.  
  55. Sub cmdcancel_Click ()
  56.     frmfold.Hide
  57. End Sub
  58.  
  59. Sub cmdok_Click ()
  60. Dim groupname As String
  61. Dim result As Integer
  62. Dim foldernum As Integer
  63. Dim foldername As String
  64. Dim folderfile As String
  65.  
  66.     screen.MousePointer = HourGlass
  67.  
  68.     If cmbfolder.ListIndex <> -1 Then
  69.         groupname = cmbfolder.List(cmbfolder.ListIndex)
  70.         For foldernum = 1 To NUMFOLDERS
  71.             foldername = GetINI("Folders", "Name" + Format$(foldernum), "")
  72.             If foldername = groupname Then
  73.                 folderfile = app.Path + "\FOLDER" + Format$(foldernum) + ".FOL"
  74.             End If
  75.         Next foldernum
  76.         
  77.         If folderfile <> "" Then
  78.             result = SaveMsgToFolder(folderfile)
  79.             DllErr result
  80.         End If
  81.  
  82.         ' Reread folders
  83.         DoFolders
  84.     End If
  85. screen.MousePointer = default
  86. frmfold.Hide
  87. End Sub
  88.  
  89. Sub Form_Load ()
  90. Dim numgroups As Integer
  91. Dim count As Integer
  92. Dim groupname As String
  93.  
  94.     cmbfolder.Clear
  95.     numgroups = GetNumAreas()
  96.     For count = 1 To numgroups
  97.         groupname = fixstr(GetAreaName(count))
  98.         If IsFolder(count) Then cmbfolder.AddItem groupname
  99.     Next count
  100.  
  101. End Sub
  102.  
  103.